<!-- 写博客 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        back_blog - <%= title %>
    </title>
</head>
<link rel="shortcut icon" href="./images/favicon.ico">
<link rel="stylesheet" href="./bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="./bootstrap/css/bootstrap-select.css">
<link rel="stylesheet" href="./stylesheets/public.css">
<link rel="stylesheet" href="./stylesheets/writeblog.css">

<body>
    <div class="blogwrap">
        <%- include head %>
            <div class="navbarconent col-md-12 col-sm-12 col-xs-12">
                <div class="boxContent">
                    <div class="navtitle clearfix">
                        <ol class="breadcrumb">
                            <li><a href="/">主页</a></li>
                            <li><a href="/manageblogs">博客管理</a></li>
                            <li><a href="/writeblog">写博客</a></li>
                        </ol>
                    </div>
                    <div class="writeblog">
                        <p class="title">写博客</p>
                        <form role="form" class="form-horizontal" action="/writeblogs" enctype="multipart/form-data" method="post">
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2">博客标题：</label>
                                <div class="col-md-10 col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入博客标题" id="title" name="title">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2">博客作者：</label>
                                <div class="col-md-10 col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入你的名字" id="author" name="author" value="<%= authorname%>" disabled>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2">博客类别：</label>
                                <div class="col-md-10 col-sm-10">
                                    <input type="hidden" name="classify" id="chooseclassify" class="form-control" />
                                    <select class="selectpicker" id="classify" name="classify" title="请选择类别" multiple data-max-options="3" data-header="limited 3">
                                    <% for(let i in blogclassify){ %>
                                        <option value="<%= blogclassify[i].classify%>">
                                            <%= blogclassify[i].classify%>
                                        </option>
                                        <%}%>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2">博客封面：</label>
                                <div class="col-md-10 col-sm-10">
                                    <div class="filebox">
                                        <input type="file" accept="image/*" id='inputfile' name="classifyimg" />
                                        <img src="" id='willsetImg' />
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2">博客内容：</label>
                                <div class="col-md-10 col-sm-10">
                                    <script id="editor" name="editorValue" type="text/plain" style="min-height: 300px;width: auto"></script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 col-sm-2"></label>
                                <div class="col-md-10 col-sm-10">
                                    <button class="btn btn2 btn-primary" type="submit">发 布</button>
                                </div>
                            </div>
                    </div>
                </div>
            </div>
    </div>

</body>
<script src="./javascripts/jquery.min.js"></script>
<script src="./bootstrap/js/bootstrap.min.js"></script>
<script src="./bootstrap/js/bootstrap-select.js"></script>
<script type="text/javascript" charset="utf-8" src="./ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="./ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="./ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="./javascripts/sweetalert2@8.js"></script>
<script src="./javascripts/writeblog.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('editor');
</script>

</html>